//
//  HMTempViewController.swift
//  VVeibo21
//
//  Created by 李浩杰 on 16/10/23.
//  Copyright © 2016年 李浩杰. All rights reserved.
//

import UIKit

class HMTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setupUI()
    }
    
    // MARK: - 设置视图
    private func setupUI(){
        view.backgroundColor = UIColor.white
        setupNav()
    }
    //设置导航条
    private func setupNav() {
    
        navigationItem.rightBarButtonItem = UIBarButtonItem(setHighlightedImgName: nil, title: "PUSH", target: self, action: #selector(pushClick))
        navigationItem.title = "是\(navigationController?.childViewControllers.count ?? 0)个控制器"
    }
    
    // MARK: - 监听事件
    @objc private func pushClick(){
        let tempVc = HMTempViewController()
        navigationController?.pushViewController(tempVc, animated: true)
    }
}
